package java3_16.CatchMouse;

public class Cat {
    private String name;
    private String weight;
    private int power ;

    public Cat(String name ,String weight,int power){
        this.name = name;
        this.weight = weight;
        this.power = power;
    }

    public int capture(Mouse m,int a){
        System.out.println("Jerry被"+name+"抓住，Tom的体力上涨!Jerry的体力下降!");
        power = power+10;
        m.setPower(a);
        return power;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        this.power = power;
    }

}
